<div >
    <form class="form-horizontal" role="form" novalidate name="stForm" ng-switch on="translate.timeTypeCode.timeTypeCode">
        <div class="form-ctrl md-whiteframe-z1">
            <div class="form-search" style="height:225px;" ng-class="{true: 'shou'}[shoumun==0]" >
                <div>
                    <label style="width:70px">交易类型</label>
                    <md-select multiple ng-model="pboss.tradType" >
                        <md-select-label>
                            {{pboss.tradType.length ? _getNames(pboss.tradType,'tradTypeName',dateTypes) :'全部'}}
                        </md-select-label>
                        <md-option ng-value="" ng-click="_checkAll(pboss,'tradType')">全部</md-option>
                        <md-option ng-value="tradType" ng-repeat="tradType in dateTypes">{{tradType.tradTypeName}}</md-option>
                    </md-select>
                </div>
                <div>
                    <md-input-container flex>
                        <label >开始时间</label>
                        <input  type="date" time-validate='day' end-time='pboss.endTime' name='startTime'  ng-model="pboss.startTime" required>
                         <div ng-messages="stForm.startTime.$error">
                            <div ng-message="date">请正确输入时间</div>
                            <div ng-message="time-error">开始时间不应大于结束时间</div>
                            <div ng-message="too-great">结束时间不应大于当前时间</div>
                        </div>
                    </md-input-container >
                </div>
                <div>
                    <md-input-container flex>
                        <label >结束时间</label>
                        <input  type="date" time-validate="day" start-time="pboss.startTime" name='endTime' ng-model="pboss.endTime" required>
                         <div ng-messages="stForm.endTime.$error">
                            <div ng-message="date">请正确输入时间</div>
                            <div ng-message="time-error">开始时间不应大于结束时间</div>
                            <div ng-message="too-great">结束时间不应大于当前时间</div>
                        </div>
                    </md-input-container >
                </div>
                 <div>
                  <md-switch  ng-model="queryType" >
                    分机构
                  </md-switch>
                </div>

                                <div ng-if='!queryType'>
                    <label style="width:70px">发起平台</label>
                    <md-select multiple ng-model="pboss.launchPlatform " >
                        <md-select-label>
                            {{pboss.launchPlatform .length ? _getNames(pboss.launchPlatform ,'launchPlatformName',launchPlatforms) :'全部'}}
                        </md-select-label>
                        <md-option ng-value="" ng-click="_checkAll(pboss,'launchPlatform')">全部</md-option>
                        <md-option ng-value="launchPlatform" ng-repeat="launchPlatform  in launchPlatforms">{{launchPlatform.launchPlatformName}}</md-option>
                    </md-select>
                </div>

                <div ng-if='!queryType'>
                   <label style="">落地平台</label>
                     <md-select multiple ng-model="pboss.landingPlatform " >
                        <md-select-label>
                            {{pboss.landingPlatform .length ? _getNames(pboss.landingPlatform ,'landingPlatformName',landingPlatforms) :'全部'}}
                        </md-select-label>
                     <md-option ng-value="landingPlatform"     ng-repeat="landingPlatform in landingPlatforms">{{landingPlatform.landingPlatformName}}
                     </md-option>
                   </md-select>
                </div>
                <div ng-if='queryType'>
                    <label style="width:70px">发起机构</label>
                    <md-select multiple ng-model="pboss.launchAgencyCode" >
                        <md-select-label>
                            {{pboss.launchPlatform .length ? _getNames(pboss.launchPlatform ,'launchPlatformName',launchPlatforms) :'全部'}}
                        </md-select-label>
                        <md-option ng-value="" ng-click="_checkAll(pboss,'launchAgencyCode')">全部</md-option>
                        <md-option ng-value="launchAgency" ng-repeat="launchAgency in  launchAgencys">{{launchAgency.launchAgencName}}</md-option>
                    </md-select>
                </div>

                <div  ng-if='queryType'>
                   <label style="queryType">落地机构</label>
                     <md-select multiple ng-model="pboss.landingPlatformCode " >
                        <md-select-label>
                            {{pboss.landingPlatform .length ? _getNames(pboss.landingPlatform ,'landingPlatformName',landingPlatforms) :'全部'}}
                        </md-select-label>
                     <md-option ng-value="" ng-click="_checkAll(pboss,'landingPlatformCode')">全部</md-option>
                     <md-option ng-value="landingAgency"     ng-repeat="landingAgency in landingAgencys">{{landingAgency.landingAgencyName}}
                     </md-option>
                   </md-select>
                </div>
           </div>
           <i class="glyphicon glyphicon-chevron-up shrinkage" ng-click="shoumun=0"></i>
            <md-button ng-click="queryAllChannel()" ng-click="shoumun==1?shoumun=0:shoumun=1" class="md-fab md-primary md-hue-1" ng-disabled ='stForm.$invalid' aria-label="Profile">
                <i class="glyphicon glyphicon-arrow-down" style="margin-top:28px;" ng-show="shoumun==0"></i>
                <i class="glyphicon glyphicon-search" ng-show="shoumun==1"></i>
            </md-button>
        </div>
    </form>
          <div class="menus">
            <form action="{{excelExport}}"  target="_black"  method="post" >
              <input type='hidden' name="data"  value='{{ExportList}}'>
             <md-button  type="submit"  class="md-raised">导出Excel</md-button>
            </form>
          </div>
    <div style="text-align: center" >
       <h3  style="margin-top:0;font-size:large;font-weight:bold;color:black">
         分平台统计结果 {{pboss.startTime | date : 'yyyy-MM-dd'}} 至  {{pboss.endTime | date : 'yyyy-MM-dd'}}
      </h3>
      </div>
    <div class="table-info"   >
        <div>
            <div class="table-detail">
                <div class="t_r">
                    <table class="table table-bordered">
                        <thead>
                        <tr>
                            <th width="10%">交易类型</th>
                            <th width="10%" >发起平台</th>
                            <th width="10%" >落地平台</th>
                            <th width="10%" >交易总量</th>
                            <th width="10%" >交易成功量</th>
                            <th width='10%'>交易失败量</th>
                            <th  width='10%'>交易成功率%</th>
                             <th width='10%'>统计开始时间</th>
                            <th  width='10%'>统计结束时间</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-repeat="item in items.data">
                            <td width="10%"  >{{item.tradingTypeName}}</td>
                            <td width="10%"  >{{item.launchPlatformName}}</td>
                            <td width="10%"  >{{item.landingPlatformName }}</td>
                            <td width="10%" >{{item.total }}</td>
                            <td width="10%" >{{item.tradingSucceed }}</td>
                            <td width="10%" >{{item.tradingFail}}</td>
                            <td width="10%" >{{item.rate}}</td>
                            <td width="10%" >{{pboss.startTime| date :'yyyyMMdd'}}</td>
                            <td width="10%" >{{pboss.endTime| date:'yyyyMMdd'}}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div id="pboss" style='height:550px;padding-bottom:20px'></div>
    </div>
</div>
